#ifndef SNAKE_H
#define SNAKE_H

#include <QWidget>
#include <QMainWindow>
#include <QLine>
#include <QPushButton>
#include <QPoint>
#include <QDebug>
#include <QColor>
#include <QList>
#include <QPainter>
#include <random>
#include <time.h>
#include <QMessageBox>
#define WH 50
namespace Ui {
class snake;
}

class snake : public QWidget
{
    Q_OBJECT

public:
    explicit snake(QWidget *parent = nullptr);
    ~snake();
    void paintEvent(QPaintEvent *event);
    void timerEvent(QTimerEvent *event);
    void keyPressEvent(QKeyEvent *event);

private:
    Ui::snake *ui;
    QList<QPoint> snakes;
    int dir;
    QList<QPoint> food_list;
};


#endif // SNAKE_H
